package cn.edu.dao;

import cn.edu.pojo.Product;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author wans
 * @create 2022-10-14 20:41
 */
public interface ProductMapper {
    @Select("select * from tb_product where id in " +
            "(select product_id from 	tb_ordersitem where orders_id = #{id} )")
    List<Product> selectProductByOrdersId(int orders_id);//根据订单id返回多个关联的的商品

}
